<template>
	<view class="">
		<view class="special-wap">
			<view class="special-text">
				推荐资料
			</view>

		</view>
		<swiper :indicator-dots="true" :autoplay="false" :interval="3000" :duration="500" style="height:550rpx;margin-bottom: 20rpx;"
		 indicator-color="#DBDBDB" indicator-active-color="#c40200">
		
			<swiper-item v-for="(item,index) in list" :key="index">
				<view class="practce_list" >
					<view class="practce_list_box" v-for="(item,index) in item" :key="index" @click="parcticeJump(item.id)">
						<view class="practce_list_img">
							<image :src="item.wjlx" mode="heightFix"></image>
						</view>
						<view class="practce_list_text">
							{{item.title}}
						</view>
					</view>
					
				</view>
			</swiper-item>


		</swiper>
	</view>

</template>

<script>
	export default {
		data() {
			return {

			}
		},
		props: {
			list: {
				type: Array,
				default () {
					return []
				}
			}
		},
		methods: {
			parcticeJump(id){
				this.$u.route('/pages/HomeLnner/PracticeDetails/PracticeDetails', {
					id: id
				});
			}
		}
	}
</script>

<style scoped lang="scss">
	.special-wap {
		padding: 0rpx 30rpx;
		background-color: #fff;

		.special-text {
			font-size: 34rpx;
			font-weight: bold;
			color: #000000;
			margin-bottom: 40rpx;
		}


	}

	.practce_list {
		display: flex;
		flex-wrap: wrap;
		justify-content: space-between;

		.practce_list_box {
			box-shadow: 0px 1px 10px 0px #E5E5E5;
			border-radius: 5px;
			width: 220rpx;
			height: 240rpx;
			margin-bottom: 25rpx;
			padding-bottom:20rpx;
			overflow: hidden;
			.practce_list_img{
				width: 220rpx;
				height: 150rpx;
				overflow: hidden;
				display: flex;
				justify-content: center;
				image {
					height: 100%;
					border-radius: 5rpx 5rpx 0px 0px;
				}
			}
		

			.practce_list_text {
				overflow: hidden;
				text-overflow: ellipsis;
				display: -webkit-box;
				-webkit-line-clamp: 2;
				-webkit-box-orient: vertical;
				font-size: 24rpx;
				color: #333333;
				padding-top: 10rpx;
				text-align: center;
			}
		}
	}

	/deep/.uni-swiper-dot {
		height: 14rpx;
		width: 14rpx;
	}

	uni-swiper-item {
		padding: 0 30rpx;
		box-sizing: border-box;
	}

	/deep/.uni-swiper-dot-active {
		width: 24rpx;
		height: 14rpx;
		border-radius: 14rpx;
	}
	/deep/uni-swiper .uni-swiper-dots-horizontal{
		bottom:4rpx
	}
</style>
